package cn.liberals.controller;

import cn.liberals.Feign.UserFeignClient;
import cn.liberals.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PayController {

    @Autowired
    private UserFeignClient userFeignClient;

    @RequestMapping("/pay/{id}")
    public User getUserById(@PathVariable Long id) {
        return userFeignClient.getUserById(id);
    }
}
